package com.joint.base.dao.impl;

import com.fz.us.base.bean.BaseEnum;
import com.joint.base.dao.StepBriefDao;
import com.joint.base.dao.TodoDataDao;
import com.joint.base.entity.ProcessBrief;
import com.joint.base.entity.StepBrief;
import com.joint.base.entity.TodoData;
import com.joint.base.entity.Users;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by ZhuChunXiao on 2017/4/26.
 */
@Repository
public class TodoDataDaoImpl extends BaseEntityDaoImpl<TodoData, String> implements TodoDataDao {

    @Override
    public List<TodoData> getInfoByUsers(Users users) {
        String hql = " from TodoData where users = :users and state = :state";
        List<TodoData> todoDataList = getSession().createQuery(hql).setParameter("users", users)
                .setParameter("state", BaseEnum.StateEnum.Enable).list();
        return  todoDataList;
    }
}
